package com.fcscs.cservice.client.common;

public class UIUtils {
	public static int getCharCount(String v) {
		if (v != null) {
			int charCount = 0;
			String[] strs = v.split("\\t|\r|\n");// original include \\s* : "\\s*|\t|\r|\n" , s* : many whitespaces
			for (String str : strs) {
				charCount += str.length();
			}
			return charCount;
		}
		return 0;
	}
	
	public static String getStr(String v) {
		StringBuffer sb = new StringBuffer();
		if (v != null) {
			String[] strs = v.split("\\t|\r|\n");// original include \\s* : "\\s*|\t|\r|\n" , s* : many whitespaces
			for (String str : strs) {
				sb.append(str);
			}
		}
		return sb.toString();
	}
}
